package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

/**
 * 首页一二三级联菜单
 */

@Data
@TableName("category")
public class Category {
    @TableId("category_id")
    private Integer id;
    @TableField("category_name")
    private String name;
    @TableField("category_level")
    private Integer categoryIevel;
    @TableField("parent_id")
    private Integer parentId;

    @TableField(exist = false)
    private List<Category> children;

    @TableField(exist = false)
    private Category parent;
}